﻿using System;
using System.Collections.Generic;
using System.Linq;
using Infrastucture;

namespace TimeSplicerModule.DomainModels
{
    public class UserModel : DomainObject
    {
        #region Fields..
        private Guid _userGuid;
        private Guid _statusGuid;
        private Guid _applicationRoleGuid;
        private Guid _teamGuid;
        private Guid _jobRoleGuid;
        private string _login;
        private string _password;
        private string _firstName;
        private string _lastName;
        private string _fullName;
        private StatusModel _status;
        private ApplicationRoleModel _applicationRole;
        private TeamModel _team;
        private JobRoleModel _jobRole;
        private List<StatusModel> _statuses;
        private List<ApplicationRoleModel> _applicationRoles;
        private List<TeamModel> _teams;
        private List<JobRoleModel> _jobRoles;
        #endregion Fields

        #region Properties...
        public Guid UserGuid
        {
            get { return _userGuid; }
            set { SetProperty(ref _userGuid, value); }
        }
        public Guid StatusGuid
        {
            get { return _statusGuid; }
            set { SetProperty(ref _statusGuid, value); }
        }
        public Guid ApplicationRoleGuid
        {
            get { return _applicationRoleGuid; }
            set  { SetProperty(ref _applicationRoleGuid, value); }
        }
        public Guid TeamGuid
        {
            get { return _teamGuid; }
            set { SetProperty(ref _teamGuid, value); }
        }
        public Guid JobRoleGuid
        {
            get { return _jobRoleGuid; }
            set { SetProperty(ref _jobRoleGuid, value); }
        }
        public string Login
        {
            get { return _login; }
            set { SetProperty(ref _login, value); }
        }
        public string Password
        {
            get { return _password; }
            set { SetProperty(ref _password, value); }
        }
        public string FirstName
        {
            get { return _firstName; }
            set
            {
                SetProperty(ref _firstName, value);
                this.FullName = String.Format("{0} {1}", this.FirstName, this.LastName);
            }
        }
        public string LastName
        {
            get { return _lastName; }
            set
            {
                SetProperty(ref _lastName, value);
                this.FullName = String.Format("{0} {1}", this.FirstName, this.LastName);
            }
        }
        [DoNotConvert]
        public string FullName
        {
            get { return _fullName; }
            private set { SetProperty(ref _fullName, value); }
        }
        public StatusModel Status
        {
            get { return _status; }
            set { SetProperty(ref _status, value); }
        }
        public ApplicationRoleModel ApplicationRole
        {
            get { return _applicationRole; }
            set { SetProperty(ref _applicationRole, value); }
        }
        public TeamModel Team
        {
            get { return _team; }
            set { SetProperty(ref _team, value); }
        }
        public JobRoleModel JobRole
        {
            get { return _jobRole; }
            set { SetProperty(ref _jobRole, value); }
        }
        public List<StatusModel> Statuses
        {
            get { return _statuses; }
            set { SetProperty(ref _statuses, value); }
        }
        public List<ApplicationRoleModel> ApplicationRoles
        {
            get { return _applicationRoles; }
            set { SetProperty(ref _applicationRoles, value); }
        }
        public List<TeamModel> Teams
        {
            get { return _teams; }
            set { SetProperty(ref _teams, value); }
        }
        public List<JobRoleModel> JobRoles
        {
            get { return _jobRoles; }
            set { SetProperty(ref _jobRoles, value); }
        }
        #endregion Properties
    }
}
